package com.exchange.controller;

import com.exchange.entity.model.ExchangeRecordModel;
import com.exchange.entity.pojo.ExchangeRecord;
import com.exchange.service.ExchangeRecordService;
import com.exchange.until.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Author : RulerWood
 * @Data : 2024/5/9 - 21:32
 */
@RestController
@RequestMapping("/echarts")
public class EchartsController {
    @Autowired
    private ExchangeRecordService exchangeRecordService;

    @GetMapping("/listDisplay")
    public Result<Map<String, List>> listDisplay(@RequestParam(value = "day",defaultValue = "0")Integer day){
       return this.exchangeRecordService.findAddressAndDisplay(day);
    }

}
